package easymall.clients;

import easymall.config.MultipartSupportConfig;
import easymall.po.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("userservice")
public interface UserService {

    @PostMapping("/login")
    User login(@RequestBody User user);

    @GetMapping("/checkUsername")
    Boolean checkUsername(@RequestParam String username);

    @PostMapping("/regist")
    int regist(@RequestBody User user);

    @GetMapping("/getUser")
    User getUser(@RequestParam Integer id);

    @GetMapping("modifyValid")
    int modifyValid(@RequestParam Integer id);

    @GetMapping("getValid")
    int getValid(@RequestParam Integer id);

    @PostMapping("remove")
    int remove(@RequestBody User user);
}
